#ifndef Tui_TUI_h
#define Tui_TUI_h

#include "TBase.h"
#include "TImage.h"
#include "TLabel.h"
#include "TScale9.h"
#include "TButton.h"
#include "TTip.h"
#include "TTab.h"
#include "TMaskPanel.h"
#include "TPage.h"
#include "TBar.h"
#include "TCount.h"
#include "TBox.h"
#include "TRocker.h"
#include "TCheckBox.h"
#include "TDropdown.h"
#include "TAccordion.h"
#include "TWin.h"
#include "TGraySprite.h"

#define T_BUTTON_NAME   "tui:TButton"
#define T_SCALE9_NAME   "tui:TScale"
#define T_IMAGE_NAME    "tui:TImage"
#define T_LABEL_NAME    "tui:TLabel"
#define T_TAB_NAME      "tui:TTab"
#define T_SCROLL_NAME   "tui:TScrollPanel"
#define T_PAGE_NAME     "tui:TPage"
#define T_PANEL_NAME    "tui:TPanel"
#define T_PANE_ITEM_NAME "tui:TPanelItem"
#define T_BAR_NAME      "tui:TBar"
#define T_COUNT_NAME   "tcom:TCount"
#define T_VBOX_NAME   "tui:TVBox"
#define T_ROCKER_NAME   "tui:TRocker"
#define T_CHECK_NAME   "tui:TCheckBox"
#define T_EDIT_BAR_NAME   "tui:TEditBar"
#define T_INPUT_NAME   "tui:TInput"
#define T_RADIO_NAME   "tui:TRadio"
#define T_ACCORDION_NAME  "tui:TAccordion"
#define T_DROPDOWN_NAME  "tui:TDropdown"
#define T_STROKE_LABEL_NAME  "tui:TStrokeLabel"


#define PACK_ASSETS_PLIST 0

class TUIExpand{
public: 
    virtual TPanelItem* createUI(xml_node<> *);
    virtual TPanelItem* createUI(const string&);
};

                  
class   TUI
{
public:
    TUI(void);
    virtual ~TUI(void);
    
    void init();
    static TUI* sharedDirector(void);
    
    
    void setExpand(TUIExpand* exp);
    
    TPanelItem* createUI(xml_node<> *);
    TPanelItem* createUI(const string&);
    
    xml_document<>* getDoc(const string&);
    void addDoc(const string& ,xml_document<>*,unsigned char * data);
protected:
    map<string, xml_document<> * > docs;
    vector<unsigned char *> datas;
    TUIExpand* m_pExpand;
};



#endif
